package com.hawthorn.admin.feign.redisService;

import com.hawthorn.entity.po.SysUserPO;
import com.hawthorn.platform.config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.FeignFallback;
import org.springframework.cloud.openfeign.HystrixFallbackFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * <p>todo 用户同步redis feign服务</p>
 * @author: andy.ten@tom.com | xukaixing@hotmail.com
 * @created: 2022/8/1 15:08
 * @version v1.0.1
 * @copyright: Copyright (c)  andyten
 */
@FeignClient(name = "sentury-redis", url = "http://127.0.0.1:5505/", contextId = "userRedisClient", path = "/user", configuration = FeignConfig.class, fallbackFactory = HystrixFallbackFactory.class)
// @FeignClient(name = "sentury-redis", contextId = "userRedisClient", path = "/user", configuration = FeignConfig.class, fallbackFactory = HystrixFallbackFactory.class)
public interface RedisUserFeignService extends FeignFallback
{
  @PostMapping(value = "/updateUser")
  void updateUser(@RequestBody SysUserPO sysUserPO);

  @PutMapping(value = "/saveUser")
  void saveUser(@RequestBody SysUserPO sysUserPO);
}
